package task;

import java.util.Scanner;

public class Task5_4 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        resove(n);

    }
    public static  void resove(int n){
        if(n < 10){
            System.out.print(n + " ");

        }else{
            resove(n / 10);
            System.out.print(n % 10 + " ");
        }

    }
}
